﻿create proc thuan_qtphannhommenu_loadluoinhomnguoidungbyuserid
@UserID int
as
select CAST(1 as bit) as Chon,MaNhomUser,TenNhomUser from
DanhMuc_NhomNguoiDung
Where MaNhomUser in (select MaNhomUser from QuanTri_PhanNhomNguoiDung Where UserID=@UserID)
union
select CAST(0 as bit) as Chon,MaNhomUser,TenNhomUser from
DanhMuc_NhomNguoiDung
Where MaNhomUser not in (select MaNhomUser from QuanTri_PhanNhomNguoiDung Where UserID=@UserID)